group_unit_vars <- c("int_grp_rel")
group_nat_vars <- c("size")
unit_vars <- c("ladm_abs","ladm_area","admin_ruggedness_avg","oil_area_adm_pct","ldistance_capital_unit","ldistance_border_unit")
dyad_unit_vars <- c("int_grp_rel_mean","int_grp_rel_diff","reverse_dyad")
dyad_nat_vars <- c("size_mean","size_diff")
nat_vars <- c("lgdppc","lpop","politya","fractionalization1","election_year")
nat_vars_fe <- c("election_year")
m1g_t1 <- c("sa_territory_t","included")
m2g_t1 <- c("sa_territory_t*included")
m3g_t1 <- c("sa_territory_t","included","igrl_g_included","I(sa_territory_t*igrl_g_included)")
vars.order_g <- c("sa_territory_t","sa_territory_alt_t","sa_policy_territory_t","sa_fiscal_territory_t","sa_political_territory_t","igrl_g_autonomy","int_grp_rel_largest_g","autonomy","included","sa_territory_t:included","included:sa_territory_t","sa_territory_t:sa_territory_t:int_grp_rel_largest_g","sa_territory_t:int_grp_rel_largest_g:sa_territory_t","includedd_excludednd","sa_territory_t:includedd_excludednd","includedd_excludednd:sa_territory_t","includednd_excludedd","includednd_excludedd:sa_territory_t","sa_territory_t:includednd_excludedd",group_nat_vars,group_unit_vars,gsub("log\\(|\\)|\\+0.000000000001|\\+0.000001|\\+0.0000000001","", unit_vars),gsub("log\\(|\\)|\\+0.000000000001|\\+0.000001|\\+0.0000000001","", nat_vars))
m1d_t1 <- c("sa_territory_t","included_excluded", "excluded_excluded")
m2d_t1 <- c("sa_territory_t*included_excluded", "excluded_excluded")
m3d_t1 <- c("sa_territory_t*includedd_excludednd","sa_territory_t*includednd_excludedd", "excluded_excluded")
vars.order_d <- c("sa_territory_t","sa_territory_alt_t","sa_policy_territory_t","sa_fiscal_territory_t","sa_political_territory_t","sa_territory_t_l_max_any_s","igrl_g_autonomy","included_excluded","included_powerless","included_discriminated","includedd_powerlessnd","includednd_powerlessd","includedd_discriminatednd","includednd_discriminatedd","sa_territory_t*included_excluded","included_excluded*sa_territory_t","sa_territory_t:included_excluded","included_excluded:sa_territory_t","includedd_excludednd","sa_territory_t:includedd_excludednd","includedd_excludednd:sa_territory_t","includednd_excludedd","includednd_excludedd:sa_territory_t","sa_territory_t:includednd_excludedd","excluded_excluded","powerless_powerless","powerless_discriminated","discriminated_discriminated",dyad_nat_vars,dyad_unit_vars,gsub("log\\(|\\)|\\+0.000000000001|\\+0.000001|\\+0.0000000001","", unit_vars),gsub("log\\(|\\)|\\+0.000000000001|\\+0.000001|\\+0.0000000001","", nat_vars))
vars.order_gd <- c("sa_territory_t","sa_territory_alt_t","sa_policy_territory_t","sa_fiscal_territory_t","sa_political_territory_t","sa_territory_t_l_max_any_s","igrl_g_autonomy","included","included_excluded","included_powerless","included_discriminated","includedd_powerlessnd","includednd_powerlessd","includedd_discriminatednd","includednd_discriminatedd","sa_territory_t*included_excluded","included_excluded*sa_territory_t","sa_territory_t:included_excluded","included_excluded:sa_territory_t","includedd_excludednd","sa_territory_t:includedd_excludednd","includedd_excludednd:sa_territory_t","includednd_excludedd","includednd_excludedd:sa_territory_t","sa_territory_t:includednd_excludedd","excluded_excluded","powerless_powerless","powerless_discriminated","discriminated_discriminated",group_nat_vars,dyad_nat_vars,group_unit_vars,dyad_unit_vars,gsub("log\\(|\\)|\\+0.000000000001|\\+0.000001|\\+0.0000000001","", unit_vars),gsub("log\\(|\\)|\\+0.000000000001|\\+0.000001|\\+0.0000000001","", nat_vars))
vars.order_t <- c("sa_territory_t","included","sa_territory_t:included","included:sa_territory_t","includedd_excludednd","sa_territory_t:includedd_excludednd","includedd_excludednd:sa_territory_t","includednd_excludedd","includednd_excludedd:sa_territory_t","sa_territory_t:includednd_excludedd",gsub("log\\(|\\)|\\+0.000000000001|\\+0.000001|\\+0.0000000001","", unit_vars),gsub("log\\(|\\)|\\+0.000000000001|\\+0.000001|\\+0.0000000001","", nat_vars))
m1g_t1_g <- c("sa_territory_t_avg","included")
group_unit_vars_avg <- paste(group_unit_vars, "_avg", sep="")
dyad_unit_vars_avg <- c("int_grp_rel_mean_avg","int_grp_rel_diff_avg")
unit_vars_avg2_g <- c("lsize_abs","lgroup_area","admin_ruggedness_avg_avg","oil_area_pct","ldistance_capital","ldistance_border")#lsize_abs
unit_vars_avg2_d <- c("lsize_abs_mean","lgroup_area_mean","admin_ruggedness_avg_avg","oil_area_pct_mean","ldistance_capital_mean","ldistance_border_mean")
group_gid_vars <- c("rel_grp_gid")
gid_vars <- c("lgid_abs","lgrid_adm_area","gid_ruggedness_avg","oil_gid","ldistance_capital_gid","ldistance_border_gid")
dyad_gid_vars <- c("rel_grp_gid_mean","rel_grp_gid_diff", "reverse_dyad")
unit_vars_unlogged <- gsub("ldistance","distance",unit_vars)
unit_vars_unlogged <- gsub("ladm","adm",unit_vars_unlogged)
nat_vars_unlogged <- gsub("lgdp","gdp",nat_vars)
nat_vars_unlogged <- gsub("lpop","pop",nat_vars_unlogged)